package com.lk.api.app;

import android.app.Activity;
import android.content.ContentResolver;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.lk.api.R;

/**
 * 在同一个应用测试 跨进程数据共享
 * 新建一个项目测试跨进程测试 请到项目根路径查看源代码文件
 * Created by lk on 2014/12/29.
 */
public class MyContentResolver extends Activity {
    public  Button button;
    private ContentResolver contentResolver;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.mycontentresolver);
        contentResolver = getContentResolver();

        button = (Button) findViewById(R.id.ButonContentResolver);
        button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
//
                Cursor cursor= contentResolver.query(Uri.parse("content://com.lk.api.app.lk"),null,null,null,null,null);

            }
        });

    }
}
